/* Class19 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */

public class Class19 {
	public Node aClass39_355;
	public static JString aClass3_356;
	public static byte[] cacheFileBuffer = new byte[520];
	public int anInt358;
	public static JString aClass3_359;
	public long aLong360;
	public static boolean aBoolean361 = false;
	public Node[] aClass39Array362;
	public static int anInt363;
	public Node aClass39_364;
	public static Deque aClass49_365;
	public int anInt366 = 0;
	public static boolean aBoolean367 = false;
	public static JString aClass3_368;
	public static Class9 aClass9_369;
	public static Class19 aClass19_370;
	public static int anInt371;
	public static JString aClass3_372;
	public static JString aClass3_373;
	public static JString aClass3_374;
	public static JString aClass3_375;
	public static JString aClass3_376;
	public static int[] anIntArray377;
	public static JString aClass3_378;
	public static JString aClass3_379;
	public static JString aClass3_380;
	public static long aLong381;
	public static JString aClass3_382;
	public static JString aClass3_383;
	public static JString aClass3_384;
	public static JString aClass3_385;
	public static JString aClass3_386;

	public static void method237(long l, byte i) {
		if (l != 0L) {
			for (int i_0_ = 0; Class15.anInt282 > i_0_; i_0_++) {
				if (Class39_Sub5_Sub9.aLongArray1808[i_0_] == l) {
					Class39_Sub14.aBoolean1520 = true;
					Class15.anInt282--;
					for (int i_1_ = i_0_; i_1_ < Class15.anInt282; i_1_++)
						Class39_Sub5_Sub9.aLongArray1808[i_1_] = Class39_Sub5_Sub9.aLongArray1808[i_1_ + 1];
					PacketStream.outputStream.writePacket(250);
					PacketStream.outputStream.writeLong(true, l);
					break;
				}
			}
		}
	}

	public void method238(long l, Node class39, byte i) {
		if (class39.previous != null)
			class39.unlink();
		Node class39_2_ = aClass39Array362[(int) (l & (long) (anInt358 - 1))];
		class39.previous = class39_2_.previous;
		class39.next = class39_2_;
		class39.previous.next = class39;
		class39.next.previous = class39;
		class39.hash = l;
	}

	public Node method239(int i) {
		anInt366 = 0;
		return method241(-1663);
	}

	public static JString method240(byte i, byte[] is, int i_3_, int i_4_) {
		JString class3 = new JString();
		class3.length = 0;
		class3.characters = new byte[i_4_];
		for (int i_5_ = i_3_; i_3_ + i_4_ > i_5_; i_5_++) {
			if (is[i_5_] != 0)
				class3.characters[class3.length++] = is[i_5_];
		}
		return class3;
	}

	public Node method241(int i) {
		if (anInt366 > 0 && aClass39Array362[anInt366 - 1] != aClass39_364) {
			Node class39 = aClass39_364;
			aClass39_364 = class39.next;
			return class39;
		}
		while (anInt358 > anInt366) {
			Node class39 = aClass39Array362[anInt366++].next;
			if (class39 != aClass39Array362[anInt366 - 1]) {
				aClass39_364 = class39.next;
				return class39;
			}
		}
		if (i != -1663)
			aClass3_382 = null;
		return null;
	}

	public Class19(int i) {
		anInt358 = i;
		aClass39Array362 = new Node[i];
		for (int i_6_ = 0; i_6_ < i; i_6_++) {
			Node class39 = aClass39Array362[i_6_] = new Node();
			class39.previous = class39;
			class39.next = class39;
		}
	}

	public Node method242(byte i) {
		if (aClass39_355 == null)
			return null;
		for (Node class39 = aClass39Array362[(int) (aLong360 & (long) (anInt358 - 1))]; class39 != aClass39_355; aClass39_355 = aClass39_355.next) {
			if (aLong360 == aClass39_355.hash) {
				Node class39_7_ = aClass39_355;
				aClass39_355 = aClass39_355.next;
				return class39_7_;
			}
		}
		aClass39_355 = null;
		return null;
	}

	public static void method243(int i) {
		aClass49_365 = null;
		aClass9_369 = null;
		anIntArray377 = null;
		aClass3_380 = null;
		aClass3_386 = null;
		aClass3_356 = null;
		aClass3_378 = null;
		aClass3_384 = null;
		aClass3_374 = null;
		aClass3_385 = null;
		aClass19_370 = null;
		aClass3_379 = null;
		aClass3_372 = null;
		aClass3_382 = null;
		cacheFileBuffer = null;
		aClass3_376 = null;
		aClass3_368 = null;
		aClass3_375 = null;
		aClass3_383 = null;
		aClass3_373 = null;
		aClass3_359 = null;
	}

	public static void method244(GameCharacter class39_sub5_sub4_sub4, boolean bool) {
		class39_sub5_sub4_sub4.anInt2274 = 0;
		if (class39_sub5_sub4_sub4.anInt2292 == 0)
			class39_sub5_sub4_sub4.orientation = 1024;
		if (class39_sub5_sub4_sub4.anInt2292 == 1)
			class39_sub5_sub4_sub4.orientation = 1536;
		int i = class39_sub5_sub4_sub4.anInt2256 - Class2.anInt48;
		if (class39_sub5_sub4_sub4.anInt2292 == 2)
			class39_sub5_sub4_sub4.orientation = 0;
		int i_8_ = (class39_sub5_sub4_sub4.anInt2297 * 64 + class39_sub5_sub4_sub4.anInt2287 * 128);
		class39_sub5_sub4_sub4.anInt2301 += (i_8_ - class39_sub5_sub4_sub4.anInt2301) / i;
		if (class39_sub5_sub4_sub4.anInt2292 == 3)
			class39_sub5_sub4_sub4.orientation = 512;
		int i_9_ = (class39_sub5_sub4_sub4.anInt2266 * 128 + class39_sub5_sub4_sub4.anInt2297 * 64);
		class39_sub5_sub4_sub4.anInt2275 += (i_9_ - class39_sub5_sub4_sub4.anInt2275) / i;
	}

	public Node method245(byte i, long l) {
		aLong360 = l;
		Node class39 = aClass39Array362[(int) (l & (long) (anInt358 - 1))];
		for (aClass39_355 = class39.next; class39 != aClass39_355; aClass39_355 = aClass39_355.next) {
			if (l == aClass39_355.hash) {
				Node class39_10_ = aClass39_355;
				aClass39_355 = aClass39_355.next;
				return class39_10_;
			}
		}
		aClass39_355 = null;
		return null;
	}

	static {
		aClass3_359 = Class39_Sub5_Sub9.createJString(117, "Enter name of friend to add to list");
		aClass3_356 = aClass3_359;
		aClass3_368 = Class39_Sub5_Sub9.createJString(114, "@yel@");
		aClass49_365 = new Deque();
		anInt371 = 0;
		aClass19_370 = new Class19(4096);
		aClass3_373 = Class39_Sub5_Sub9.createJString(120, "Wordpack geladen)3");
		aClass3_375 = Class39_Sub5_Sub9.createJString(109, " )2> @lre@");
		aClass3_376 = Class39_Sub5_Sub9.createJString(104, "Loaded textures");
		aClass3_379 = Class39_Sub5_Sub9.createJString(117, "Select");
		aClass3_378 = Class39_Sub5_Sub9.createJString(114, "Fehler bei der Verbindung zum Server)3");
		aClass3_372 = Class39_Sub5_Sub9.createJString(115, "Could not complete login)3");
		aClass3_383 = aClass3_379;
		aClass3_380 = (Class39_Sub5_Sub9.createJString(107, "(WSpielkonto wiederherstellen(W Option auf der Hauptseite)3"));
		aClass3_384 = Class39_Sub5_Sub9.createJString(118, "Lade Ignorieren)2Liste)3)3)3");
		aClass3_382 = Class39_Sub5_Sub9.createJString(107, "You have only just left another world)3");
		aClass3_374 = aClass3_382;
		aClass3_385 = aClass3_372;
		aClass3_386 = aClass3_376;
	}
}
